home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / program / knobvb25.zip / VB.ZIP / KCAPTION.FRM < prev    next >
Text File  |  1996-01-17  |  15KB  |  474 lines

  1. VERSION 2.00
  2. Begin Form CaptionDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Caption Properties Demo"
  6.    ClientHeight    =   3690
  7.    ClientLeft      =   1845
  8.    ClientTop       =   1605
  9.    ClientWidth     =   7065
  10.    Height          =   4095
  11.    Left            =   1785
  12.    LinkTopic       =   "Form2"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   3690
  15.    ScaleWidth      =   7065
  16.    Top             =   1260
  17.    Width           =   7185
  18.    Begin Frame Frame4 
  19.       BackColor       =   &H00C0C0C0&
  20.       Caption         =   "CaptionFontID"
  21.       FontBold        =   -1  'True
  22.       FontItalic      =   0   'False
  23.       FontName        =   "Arial"
  24.       FontSize        =   8.25
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   1020
  28.       Left            =   3375
  29.       TabIndex        =   24
  30.       Top             =   1095
  31.       Width           =   1515
  32.       Begin OptionButton Option2 
  33.          BackColor       =   &H00C0C0C0&
  34.          Caption         =   "MS Serif"
  35.          FontBold        =   -1  'True
  36.          FontItalic      =   0   'False
  37.          FontName        =   "MS Serif"
  38.          FontSize        =   9.75
  39.          FontStrikethru  =   0   'False
  40.          FontUnderline   =   0   'False
  41.          Height          =   240
  42.          Index           =   2
  43.          Left            =   150
  44.          TabIndex        =   5
  45.          Top             =   720
  46.          Width           =   1320
  47.       End
  48.       Begin OptionButton Option2 
  49.          BackColor       =   &H00C0C0C0&
  50.          Caption         =   "Courier"
  51.          FontBold        =   -1  'True
  52.          FontItalic      =   -1  'True
  53.          FontName        =   "Courier"
  54.          FontSize        =   9.75
  55.          FontStrikethru  =   0   'False
  56.          FontUnderline   =   0   'False
  57.          Height          =   225
  58.          Index           =   1
  59.          Left            =   150
  60.          TabIndex        =   6
  61.          Top             =   510
  62.          Width           =   1320
  63.       End
  64.       Begin OptionButton Option2 
  65.          BackColor       =   &H00C0C0C0&
  66.          Caption         =   "Arial"
  67.          FontBold        =   -1  'True
  68.          FontItalic      =   0   'False
  69.          FontName        =   "Arial"
  70.          FontSize        =   8.25
  71.          FontStrikethru  =   0   'False
  72.          FontUnderline   =   0   'False
  73.          Height          =   225
  74.          Index           =   0
  75.          Left            =   150
  76.          TabIndex        =   9
  77.          Top             =   300
  78.          Value           =   -1  'True
  79.          Width           =   1020
  80.       End
  81.    End
  82.    Begin Frame Frame3 
  83.       BackColor       =   &H00C0C0C0&
  84.       Caption         =   "Caption Position"
  85.       FontBold        =   -1  'True
  86.       FontItalic      =   0   'False
  87.       FontName        =   "Arial"
  88.       FontSize        =   8.25
  89.       FontStrikethru  =   0   'False
  90.       FontUnderline   =   0   'False
  91.       Height          =   870
  92.       Left            =   3375
  93.       TabIndex        =   23
  94.       Top             =   2145
  95.       Width           =   3630
  96.       Begin HScrollBar HScroll1 
  97.          Height          =   240
  98.          Index           =   0
  99.          Left            =   1200
  100.          Max             =   140
  101.          Min             =   -140
  102.          TabIndex        =   28
  103.          Top             =   300
  104.          Width           =   2000
  105.       End
  106.       Begin HScrollBar HScroll1 
  107.          Height          =   240
  108.          Index           =   1
  109.          Left            =   1200
  110.          Max             =   140
  111.          Min             =   -140
  112.          TabIndex        =   27
  113.          Top             =   540
  114.          Width           =   2000
  115.       End
  116.       Begin Label Label3 
  117.          AutoSize        =   -1  'True
  118.          BackColor       =   &H00C0C0C0&
  119.          Caption         =   "0"
  120.          Height          =   195
  121.          Index           =   1
  122.          Left            =   3255
  123.          TabIndex        =   10
  124.          Top             =   555
  125.          Width           =   120
  126.       End
  127.       Begin Label Label3 
  128.          AutoSize        =   -1  'True
  129.          BackColor       =   &H00C0C0C0&
  130.          Caption         =   "0"
  131.          Height          =   195
  132.          Index           =   0
  133.          Left            =   3255
  134.          TabIndex        =   25
  135.          Top             =   315
  136.          Width           =   120
  137.       End
  138.       Begin Label Label1 
  139.          AutoSize        =   -1  'True
  140.          BackStyle       =   0  'Transparent
  141.          Caption         =   "CaptionX:"
  142.          FontBold        =   0   'False
  143.          FontItalic      =   0   'False
  144.          FontName        =   "Arial"
  145.          FontSize        =   8.25
  146.          FontStrikethru  =   0   'False
  147.          FontUnderline   =   0   'False
  148.          Height          =   210
  149.          Index           =   0
  150.          Left            =   435
  151.          TabIndex        =   26
  152.          Top             =   315
  153.          Width           =   690
  154.       End
  155.       Begin Label Label1 
  156.          AutoSize        =   -1  'True
  157.          BackStyle       =   0  'Transparent
  158.          Caption         =   "CaptionY:"
  159.          FontBold        =   0   'False
  160.          FontItalic      =   0   'False
  161.          FontName        =   "Arial"
  162.          FontSize        =   8.25
  163.          FontStrikethru  =   0   'False
  164.          FontUnderline   =   0   'False
  165.          Height          =   210
  166.          Index           =   1
  167.          Left            =   420
  168.          TabIndex        =   29
  169.          Top             =   540
  170.          Width           =   705
  171.       End
  172.    End
  173.    Begin KNOB Knob1 
  174.       Angle           =   0
  175.       AutoRedraw      =   -1  'True
  176.       AVersion        =   2.5
  177.       BackgroundColor =   &H00C0C0C0&
  178.       BevelInner      =   0  ' 0 - None
  179.       BevelOuter      =   1  ' 1 - Raised
  180.       BevelWidth      =   2
  181.       BorderType      =   1  ' 1 - Bevel
  182.       BorderWidth     =   2
  183.       Digital         =   0   'False
  184.       DigitalColor    =   &H00000000&
  185.       DigitalDecimals =   0
  186.       DigitalFontID   =   0
  187.       DigitalX        =   0
  188.       DigitalY        =   0
  189.       FontID          =   0
  190.       FrameColor      =   &H00000000&
  191.       FrameScaleX     =   0
  192.       FrameScaleY     =   0
  193.       FrameStyle      =   0  ' 0 - None
  194.       Height          =   3405
  195.       KnobColor       =   &H00808080&
  196.       KnobMultiTurn   =   0   'False
  197.       KnobMultiTurnValue=   0
  198.       KnobRadius      =   0.6
  199.       KnobSnap        =   0   'False
  200.       KnobSnapIncrement=   1
  201.       KnobStyle       =   1  ' 1 - Pointer
  202.       KnobUserDefined =   ""
  203.       KnobValue       =   0
  204.       Left            =   75
  205.       MarkUserDefined =   ""
  206.       MouseControl    =   -1  'True
  207.       OutlineAlign    =   0  ' 0 - Left 
  208.       OutlineColor    =   &H00000000&
  209.       OutlineTitle    =   ""
  210.       OutlineWidth    =   0
  211.       Radius          =   0
  212.       TabIndex        =   22
  213.       Top             =   165
  214.       Value           =   0
  215.       Width           =   3135
  216.       XScale          =   0
  217.       YScale          =   0
  218.       ZLoad           =   KCAPTION.FRX:0000
  219.    End
  220.    Begin Frame Frame2 
  221.       BackColor       =   &H00C0C0C0&
  222.       Caption         =   "CaptionColor"
  223.       FontBold        =   -1  'True
  224.       FontItalic      =   0   'False
  225.       FontName        =   "Arial"
  226.       FontSize        =   8.25
  227.       FontStrikethru  =   0   'False
  228.       FontUnderline   =   0   'False
  229.       Height          =   990
  230.       Left            =   5340
  231.       TabIndex        =   21
  232.       Top             =   1095
  233.       Width           =   1680
  234.       Begin Label Colors 
  235.          BackColor       =   &H00004040&
  236.          Height          =   225
  237.          Index           =   9
  238.          Left            =   1260
  239.          TabIndex        =   7
  240.          Top             =   555
  241.          Width           =   225
  242.       End
  243.       Begin Label Colors 
  244.          BackColor       =   &H000080FF&
  245.          Height          =   225
  246.          Index           =   8
  247.          Left            =   1260
  248.          TabIndex        =   8
  249.          Top             =   315
  250.          Width           =   225
  251.       End
  252.       Begin Label Colors 
  253.          BackColor       =   &H00FF00FF&
  254.          Height          =   225
  255.          Index           =   7
  256.          Left            =   1020
  257.          TabIndex        =   13
  258.          Top             =   555
  259.          Width           =   225
  260.       End
  261.       Begin Label Colors 
  262.          BackColor       =   &H00FF0000&
  263.          Height          =   225
  264.          Index           =   6
  265.          Left            =   1020
  266.          TabIndex        =   14
  267.          Top             =   315
  268.          Width           =   225
  269.       End
  270.       Begin Label Colors 
  271.          BackColor       =   &H0000FFFF&
  272.          Height          =   225
  273.          Index           =   5
  274.          Left            =   780
  275.          TabIndex        =   15
  276.          Top             =   555
  277.          Width           =   225
  278.       End
  279.       Begin Label Colors 
  280.          BackColor       =   &H0000FF00&
  281.          Height          =   225
  282.          Index           =   4
  283.          Left            =   780
  284.          TabIndex        =   16
  285.          Top             =   315
  286.          Width           =   225
  287.       End
  288.       Begin Label Colors 
  289.          BackColor       =   &H000000FF&
  290.          Height          =   225
  291.          Index           =   3
  292.          Left            =   540
  293.          TabIndex        =   17
  294.          Top             =   555
  295.          Width           =   225
  296.       End
  297.       Begin Label Colors 
  298.          BackColor       =   &H00FFFFFF&
  299.          Height          =   225
  300.          Index           =   2
  301.          Left            =   540
  302.          TabIndex        =   18
  303.          Top             =   315
  304.          Width           =   225
  305.       End
  306.       Begin Label Colors 
  307.          BackColor       =   &H00808080&
  308.          Height          =   225
  309.          Index           =   1
  310.          Left            =   300
  311.          TabIndex        =   19
  312.          Top             =   555
  313.          Width           =   225
  314.       End
  315.       Begin Label Colors 
  316.          BackColor       =   &H00000000&
  317.          Height          =   225
  318.          Index           =   0
  319.          Left            =   300
  320.          TabIndex        =   20
  321.          Top             =   315
  322.          Width           =   225
  323.       End
  324.    End
  325.    Begin TextBox Text1 
  326.       Height          =   315
  327.       Left            =   3360
  328.       TabIndex        =   0
  329.       Text            =   " "
  330.       Top             =   3255
  331.       Width           =   3645
  332.    End
  333.    Begin Frame Frame1 
  334.       BackColor       =   &H00C0C0C0&
  335.       Caption         =   "CaptionID"
  336.       FontBold        =   -1  'True
  337.       FontItalic      =   0   'False
  338.       FontName        =   "Arial"
  339.       FontSize        =   8.25
  340.       FontStrikethru  =   0   'False
  341.       FontUnderline   =   0   'False
  342.       Height          =   1005
  343.       Left            =   3375
  344.       TabIndex        =   1
  345.       Top             =   75
  346.       Width           =   1185
  347.       Begin OptionButton Option1 
  348.          BackColor       =   &H00C0C0C0&
  349.          Caption         =   "2"
  350.          Height          =   255
  351.          Index           =   2
  352.          Left            =   350
  353.          TabIndex        =   4
  354.          TabStop         =   0   'False
  355.          Top             =   660
  356.          Width           =   615
  357.       End
  358.       Begin OptionButton Option1 
  359.          BackColor       =   &H00C0C0C0&
  360.          Caption         =   "1"
  361.          Height          =   255
  362.          Index           =   1
  363.          Left            =   350
  364.          TabIndex        =   3
  365.          TabStop         =   0   'False
  366.          Top             =   450
  367.          Width           =   615
  368.       End
  369.       Begin OptionButton Option1 
  370.          BackColor       =   &H00C0C0C0&
  371.          Caption         =   "0"
  372.          Height          =   255
  373.          Index           =   0
  374.          Left            =   350
  375.          TabIndex        =   2
  376.          Top             =   240
  377.          Value           =   -1  'True
  378.          Width           =   615
  379.       End
  380.    End
  381.    Begin Label Label1 
  382.       AutoSize        =   -1  'True
  383.       BackStyle       =   0  'Transparent
  384.       Caption         =   "Caption "
  385.       Height          =   195
  386.       Index           =   2
  387.       Left            =   3360
  388.       TabIndex        =   12
  389.       Top             =   3060
  390.       Width           =   720
  391.    End
  392.    Begin Label Label2 
  393.       Alignment       =   2  'Center
  394.       AutoSize        =   -1  'True
  395.       BackStyle       =   0  'Transparent
  396.       Caption         =   " "
  397.       Height          =   195
  398.       Index           =   2
  399.       Left            =   5265
  400.       TabIndex        =   11
  401.       Top             =   4320
  402.       Width           =   90
  403.    End
  404. End
  405.  
  406. Sub Colors_Click (index As Integer)
  407.  
  408.     knob1.CaptionColor = colors(index).BackColor
  409.     text1.ForeColor = colors(index).BackColor
  410.  
  411. End Sub
  412.  
  413. Sub Form_Load ()
  414.  
  415.     knob1.CaptionID = 0
  416.     hscroll1(0) = knob1.CaptionX * 100
  417.     hscroll1(1) = knob1.CaptionY * 100
  418.     text1.ForeColor = knob1.CaptionColor
  419.     text1 = knob1.Caption
  420.  
  421. End Sub
  422.  
  423. Sub HScroll1_Change (index As Integer)
  424.  
  425.     Select Case index
  426.         Case 0
  427.             knob1.CaptionX = hscroll1(0) / 100
  428.         Case 1
  429.             knob1.CaptionY = hscroll1(1) / 100
  430.     End Select
  431.  
  432.     label3(index) = hscroll1(index) / 100
  433.  
  434. End Sub
  435.  
  436. Sub HScroll1_Scroll (index As Integer)
  437.  
  438.     Select Case index
  439.         Case 0
  440.             knob1.CaptionX = hscroll1(0) / 100
  441.         Case 1
  442.             knob1.CaptionY = hscroll1(1) / 100
  443.     End Select
  444.  
  445.     label3(index) = hscroll1(index) / 100
  446.  
  447. End Sub
  448.  
  449. Sub Option1_Click (index As Integer)
  450.  
  451.     knob1.CaptionID = index
  452.     hscroll1(0) = knob1.CaptionX * 100
  453.     hscroll1(1) = knob1.CaptionY * 100
  454.     text1.ForeColor = knob1.CaptionColor
  455.     text1 = knob1.Caption
  456.     option2(knob1.CaptionFontID) = True
  457.  
  458. End Sub
  459.  
  460. Sub Option2_Click (index As Integer)
  461.  
  462.     knob1.CaptionFontID = index
  463.     text1.ForeColor = knob1.CaptionColor
  464.     text1 = knob1.Caption
  465.     
  466. End Sub
  467.  
  468. Sub Text1_Change ()
  469.  
  470.     knob1.Caption = text1
  471.  
  472. End Sub
  473.  
  474.